package cms.service.impl;

import cms.entity.User;
import cms.entity.UserExample;
import cms.mapper.UserMapper;
import cms.service.testLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class testLoginServiceImpl implements testLoginService {

    @Autowired
    private UserMapper userMapper;


    public List<User> listUser() {

        UserExample example=new UserExample();
        UserExample.Criteria criteria=example.createCriteria();
        criteria.getAllCriteria();

        List<User> list=userMapper.selectByExample(example);
/*        User u1=new User();
        u1.setName("test1");
        u1.setEmail("test1@");


        User u2=new User();
        u2.setName("test2");
        u2.setEmail("test2@");

        List<User> list=new ArrayList<User>();

        list.add(u1);
        list.add(u2);*/


        return list;
    }
}
